<%--
  Created by IntelliJ IDEA.
  User: 许正雄
  Date: 2021/12/7
  Time: 11:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理</title>
    <link type="text/css" rel="stylesheet" href="/static/css/style.css" />
    <script type="text/javascript" src="/static/scripts/function-manage.js"></script>
    <SCRIPT type="text/javascript" src="/static/jquery3.6.0.js"></SCRIPT>
</head>
<body>
<%@include file="/manage/head.jsp"%>
<div id="position" class="wrap">
    您现在的位置：管理后台
</div>
<div id="main" class="wrap">
    <%@include file="/manage/left.jsp"%>
<div class="main">
    <h2>修改用户</h2>
    <div class="manage">
        <form method="post" id="frm" action="/updateShowAll" enctype="multipart/form-data">
            <input type="hidden" name="id" value="${show.id}"/>
            <table class="form">
                <tr>
                    <td class="field">展示名称：</td>
                    <td><input type="text" class="text" name="showName" value="${show.showName}" /></td>
                </tr>
                <tr>
                    <td class="field">展示类型：</td>
                    <td>
                        <select name="showTypeId" id="xl">
                            <option>请选择</option>
                            <c:forEach items="${showTypes}" var="types">
                            <option value="${types.id}" <c:if test="${types.id == show.showTypeId}">selected </c:if> >${types.showTypeName}</option>
                            </c:forEach>
                        </select>
                    </td>
                </tr>
<%--                <tr>--%>
<%--                    <td class="field">是否商品：</td>--%>
<%--                    <td>--%>
<%--                        <select name="showType">--%>
<%--                            <option value="1" <c:if test="${show.goodsFlag == 1}">selected</c:if>>是</option>--%>
<%--                            <option value="0" <c:if test="${show.goodsFlag == 0}">selected</c:if>>否</option>--%>
<%--                        </select>--%>
<%--                    </td>--%>
<%--                </tr>--%>
<%--                <tr>--%>
<%--                    <td class="field">价格：</td>--%>
<%--                    <td><input type="text" class="text" name="goodsPrice" value="${show.goodsPrice}" /></td>--%>
<%--                </tr>--%>
                <tr>
                    <td class="field">图片：</td>
                    <td>
                        <img src="http://localhost/${show.showPhotoUrl}" style="width: 50px;height: 50px" > <br/>
                        <input type="file" class="text" multiple="multiple" name="photo"/>
                    </td>
                </tr>
                <tr>
                    <td class="field">描述：</td>
                    <td><textarea type="text" class="text" name="remark" value="${show.remark}"></textarea></td>
                </tr>
                <tr>
                    <td></td>
                    <td><label class="ui-blue"><button type="submit" id="but">修改</button></label></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="clear"></div>
</div>
<div id="">
</div>
</body>
<script>
    // $(function () {
    //     $("#but").click(function () {
    //         $.ajax({
    //             url:"../updateShowAll",
    //             type:"post",
    //             data:$("#frm").serialize(),
    //             success:function (ret) {
    //                 if (ret*1===1){
    //                     alert("修改成功！！！");
    //                     window.location.href="findShowAllPage";
    //                 }else if (ret === 0){
    //                     alert("修改失败，该数据不存在！")
    //                     return false;
    //                 }
    //             }
    //         })
    //     })
    // })
</script>
</html>

